QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17


# CONFIG += console

RC_ICONS = icons/logo.ico

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    configreader.cpp \
    main.cpp \
    mainwindow.cpp

HEADERS += \
    configreader.h \
    dialog.h \
    include/Qxlsx/xlsxabstractooxmlfile.h \
    include/Qxlsx/xlsxabstractooxmlfile_p.h \
    include/Qxlsx/xlsxabstractsheet.h \
    include/Qxlsx/xlsxabstractsheet_p.h \
    include/Qxlsx/xlsxcell.h \
    include/Qxlsx/xlsxcell_p.h \
    include/Qxlsx/xlsxcellformula.h \
    include/Qxlsx/xlsxcellformula_p.h \
    include/Qxlsx/xlsxcelllocation.h \
    include/Qxlsx/xlsxcellrange.h \
    include/Qxlsx/xlsxcellreference.h \
    include/Qxlsx/xlsxchart.h \
    include/Qxlsx/xlsxchart_p.h \
    include/Qxlsx/xlsxchartsheet.h \
    include/Qxlsx/xlsxchartsheet_p.h \
    include/Qxlsx/xlsxcolor_p.h \
    include/Qxlsx/xlsxconditionalformatting.h \
    include/Qxlsx/xlsxconditionalformatting_p.h \
    include/Qxlsx/xlsxcontenttypes_p.h \
    include/Qxlsx/xlsxdatavalidation.h \
    include/Qxlsx/xlsxdatavalidation_p.h \
    include/Qxlsx/xlsxdatetype.h \
    include/Qxlsx/xlsxdocpropsapp_p.h \
    include/Qxlsx/xlsxdocpropscore_p.h \
    include/Qxlsx/xlsxdocument.h \
    include/Qxlsx/xlsxdocument_p.h \
    include/Qxlsx/xlsxdrawing_p.h \
    include/Qxlsx/xlsxdrawinganchor_p.h \
    include/Qxlsx/xlsxformat.h \
    include/Qxlsx/xlsxformat_p.h \
    include/Qxlsx/xlsxglobal.h \
    include/Qxlsx/xlsxmediafile_p.h \
    include/Qxlsx/xlsxnumformatparser_p.h \
    include/Qxlsx/xlsxrelationships_p.h \
    include/Qxlsx/xlsxrichstring.h \
    include/Qxlsx/xlsxrichstring_p.h \
    include/Qxlsx/xlsxsharedstrings_p.h \
    include/Qxlsx/xlsxsimpleooxmlfile_p.h \
    include/Qxlsx/xlsxstyles_p.h \
    include/Qxlsx/xlsxtheme_p.h \
    include/Qxlsx/xlsxutility_p.h \
    include/Qxlsx/xlsxworkbook.h \
    include/Qxlsx/xlsxworkbook_p.h \
    include/Qxlsx/xlsxworksheet.h \
    include/Qxlsx/xlsxworksheet_p.h \
    include/Qxlsx/xlsxzipreader_p.h \
    include/Qxlsx/xlsxzipwriter_p.h \
    include/minizip/crypt.h \
    include/minizip/ioapi.h \
    include/minizip/iowin32.h \
    include/minizip/mztools.h \
    include/minizip/unzip.h \
    include/minizip/zip.h \
    include/xlsxwriter/xlsxwriter.h \
    # include/xlsxwriter/xlsxwriter/app.h \
    # include/xlsxwriter/xlsxwriter/chart.h \
    # include/xlsxwriter/xlsxwriter/chartsheet.h \
    # include/xlsxwriter/xlsxwriter/comment.h \
    # include/xlsxwriter/xlsxwriter/common.h \
    # include/xlsxwriter/xlsxwriter/content_types.h \
    # include/xlsxwriter/xlsxwriter/core.h \
    # include/xlsxwriter/xlsxwriter/custom.h \
    # include/xlsxwriter/xlsxwriter/drawing.h \
    # include/xlsxwriter/xlsxwriter/format.h \
    # include/xlsxwriter/xlsxwriter/hash_table.h \
    # include/xlsxwriter/xlsxwriter/metadata.h \
    # include/xlsxwriter/xlsxwriter/packager.h \
    # include/xlsxwriter/xlsxwriter/relationships.h \
    # include/xlsxwriter/xlsxwriter/rich_value.h \
    # include/xlsxwriter/xlsxwriter/rich_value_rel.h \
    # include/xlsxwriter/xlsxwriter/rich_value_structure.h \
    # include/xlsxwriter/xlsxwriter/rich_value_types.h \
    # include/xlsxwriter/xlsxwriter/shared_strings.h \
    # include/xlsxwriter/xlsxwriter/styles.h \
    # include/xlsxwriter/xlsxwriter/table.h \
    # include/xlsxwriter/xlsxwriter/theme.h \
    # include/xlsxwriter/xlsxwriter/third_party/emyg_dtoa.h \
    # include/xlsxwriter/xlsxwriter/third_party/ioapi.h \
    # include/xlsxwriter/xlsxwriter/third_party/md5.h \
    # include/xlsxwriter/xlsxwriter/third_party/queue.h \
    # include/xlsxwriter/xlsxwriter/third_party/tmpfileplus.h \
    # include/xlsxwriter/xlsxwriter/third_party/tree.h \
    # include/xlsxwriter/xlsxwriter/third_party/zip.h \
    # include/xlsxwriter/xlsxwriter/utility.h \
    # include/xlsxwriter/xlsxwriter/vml.h \
    # include/xlsxwriter/xlsxwriter/workbook.h \
    # include/xlsxwriter/xlsxwriter/worksheet.h \
    # include/xlsxwriter/xlsxwriter/xmlwriter.h \
    include/zlib/zconf.h \
    include/zlib/zlib.h \
    mainwindow.h

FORMS += \
    dialog.ui \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target


lessThan(QT_MAJOR_VERSION, 6) {
    # 检查编译模式
    win32:CONFIG(debug, debug|release) {
        CONFIG += console debug
        DEFINES += DEBUG_BUILD
        LIBS += -L$$PWD/libs/x86/debug/ -lQXlsx-5d -lzlibd -lxlsxwriter -lminizip
    } else:win32:CONFIG(release, debug|release) {
        DEFINES += RELEASE_BUILD
        LIBS += -L$$PWD/libs/x86/release/ -lQXlsx-5 -lzlib -lxlsxwriter -lminizip
    }


} else {
    # 检查编译模式
    win32:CONFIG(debug, debug|release) {
        CONFIG += console
        DEFINES += DEBUG_BUILD
        LIBS += -L$$PWD/libs/x64/debug/ -lQXlsx-6d -lzlibd -lxlsxwriter -lminizip
    } else:win32:CONFIG(release, debug|release) {
        DEFINES += RELEASE_BUILD
        LIBS += -L$$PWD/libs/x64/release/ -lQXlsx-6 -lzlib -lxlsxwriter -lminizip
    }
}


INCLUDEPATH += $$PWD/'' $$PWD/include/ $$PWD/include/minizip $$PWD/include/xlsxwriter $$PWD/include/zlib
DEPENDPATH += $$PWD/''


RESOURCES += \
    Config.qrc \
    images.qrc \
    styles.qrc

